package com.atguigu.springcloud.utils;

import com.atguigu.springcloud.config.Result;
import com.atguigu.springcloud.entity.MovieInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author : zhenyu
 * @Date : 2022/8/31 09:28
 **/

@Component
@FeignClient(url = "http://127.0.0.1:8001",value = "MOVIE-SERVICE", path = "/movie")
public interface MovieFeignService {

    @PostMapping("/today/getById")
    public MovieInfo getMoiveDetail(@RequestParam("id") Integer id);

    @PostMapping("/today/updateById")
    public Result<String> updateMovieNum(@RequestParam("id") Integer id,@RequestParam("number") Integer number);
}

